﻿using System;
using Newtonsoft.Json;
using System.ComponentModel.DataAnnotations.Schema;
using YiSha.Util;

namespace YiSha.Entity.YiDongYuan
{
    /// <summary>
    /// 创 建：admin
    /// 日 期：2021-06-09 08:20
    /// 描 述：检测任务实体类
    /// </summary>
    [Table("detectiontask")]
    public class DetectionTaskEntity : BaseCreateEntity
    {
        public string Region { get; set; }

        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public int? DetectionType { get; set; }

        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        [JsonConverter(typeof(StringJsonConverter))]
        public long? MechanicsId { get; set; }

        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public string HuanBaoCode { get; set; }

        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        [JsonConverter(typeof(StringJsonConverter))]
        public long? DetectionUserId { get; set; }

        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public int? DetectionStatus { get; set; }

        [JsonConverter(typeof(StringJsonConverter))]
        public long? DetectionInfoId { get; set; }

        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        [JsonConverter(typeof(DateTimeJsonConverter))]
        public DateTime? DetectionTime { get; set; }

        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        [JsonConverter(typeof(StringJsonConverter))]
        public long? AuditUserId { get; set; }

        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        [JsonConverter(typeof(DateTimeJsonConverter))]
        public DateTime? AuditTime { get; set; }

        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public int? AuditStatus { get; set; }

        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public string AuditReason { get; set; }

        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public string OpLog { get; set; }

        /// <summary>
        /// 上传华志信 0 未上传， 1 上传成功
        /// </summary>
        public int IsUp2Hzx { get; set; }

        [NotMapped]
        public string DetectionUserName { get; set; }

        [NotMapped]
        public string AuditUserName { get; set; }

        [NotMapped]
        public int? DetectionInfoResult { get; set; }

        [NotMapped]
        public int? DetectionInfoResultDPQ { get; set; }

        [NotMapped]
        public string SiteVideo { get; set; }

        [NotMapped]
        public string OwnerName { get; set; }

        [NotMapped]
        public string OwnerTel { get; set; }
    }
}
